Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
3d24c563
Commit
3d24c563
authored
Mar 08, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
废证修改
parent
dbf066eb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
8 deletions
+78
-8
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+30
-3
FailedCardMapper.java
...ain/java/com/yxproject/start/mapper/FailedCardMapper.java
+30
-5
FailedCardService.java
...n/java/com/yxproject/start/service/FailedCardService.java
+4
-0
FailedCardServiceImpl.java
...m/yxproject/start/service/impl/FailedCardServiceImpl.java
+14
-0
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
3d24c563
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.TaskList.TaskListEntity
;
import
com.yxproject.start.service.FailedCardService
;
import
net.sf.json.JSON
;
import
com.yxproject.start.service.TaskListService
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -21,6 +22,8 @@ import java.util.Map;
public
class
FailedCardApi
{
@Autowired
private
FailedCardService
failedCardService
;
@Autowired
private
TaskListService
taskListService
;
/**
* 查询所有废证类型
...
...
@@ -58,9 +61,33 @@ public class FailedCardApi {
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o:
jsonarray
){
JSONObject
jsonObject
=(
JSONObject
)
o
;
Map
<
String
,
Object
>
idMap
=
failedCardService
.
selectCountIdByCardId
(
jsonObject
.
get
(
"cardId"
).
toString
());
failedCardService
.
insertFailedCard
(
jsonObject
.
get
(
"failedCardReasonId"
).
toString
(),
idMap
.
get
(
"acceptNo"
).
toString
(),
idMap
.
get
(
"taskId"
).
toString
(),
jsonObject
.
get
(
"initiator"
).
toString
(),
jsonObject
.
get
(
"note"
).
toString
());
Map
<
String
,
Object
>
idMap
=
failedCardService
.
selectCountIdByCardId
(
jsonObject
.
getString
(
"cardId"
));
failedCardService
.
insertFailedCard
(
jsonObject
.
getString
(
"failedCardReasonId"
),
idMap
.
get
(
"ACCEPT_NO"
).
toString
(),
idMap
.
get
(
"TASK_ID"
).
toString
(),
jsonObject
.
getString
(
"initiator"
),
jsonObject
.
getString
(
"note"
));
}
return
true
;
}
/**
* 生成余证
* @param jsonStr
* @return
*/
@RequestMapping
(
"insertRemaining"
)
public
Boolean
insertRemaining
(
@RequestBody
String
jsonStr
){
JSONArray
jsonarray
=
JSONArray
.
fromObject
(
jsonStr
);
for
(
Object
o:
jsonarray
)
{
JSONObject
jsonObject
=(
JSONObject
)
o
;
// failedCardService.addSpecialCard(acceptNo);
// failedCardService.specialCardAdd(acceptNo);
// taskListService.createTaskList(submitDate,countyCode,Gajg);
// List<TaskListEntity> resultList= taskListService.selectACCU(submitDate,countyCode,Gajg);
// taskListService.createTaskList(resultList);
}
return
true
;
}
...
...
src/main/java/com/yxproject/start/mapper/FailedCardMapper.java
View file @
3d24c563
package
com
.
yxproject
.
start
.
mapper
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.*
;
import
org.omg.CORBA.PUBLIC_MEMBER
;
import
java.util.List
;
...
...
@@ -44,7 +41,7 @@ public interface FailedCardMapper {
* @param note
* @return
*/
@Insert
(
"INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,STATE,INITIATOR,NOTE) VALUES (#{failedCardReasonId},#{acceptNo},#{taskId},
0
,#{initiator},#{note})\n"
)
@Insert
(
"INSERT INTO FAILED_CARD (FAILED_CARD_REASON_ID,ACCEPT_NO,TASK_ID,STATE,INITIATOR,NOTE) VALUES (#{failedCardReasonId},#{acceptNo},#{taskId},
1
,#{initiator},#{note})\n"
)
public
boolean
insertFailedCard
(
@Param
(
"failedCardReasonId"
)
String
failedCardReasonId
,
@Param
(
"acceptNo"
)
String
acceptNo
,
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"initiator"
)
String
initiator
,
@Param
(
"note"
)
String
note
);
...
...
@@ -54,4 +51,32 @@ public interface FailedCardMapper {
"WHERE PROD_CARD_T.ID_NO=#{cardId} or PROD_CARD_T.ACCEPT_NO=#{cardId}"
)
public
Map
<
String
,
Object
>
selectCountIdByCardId
(
String
cardId
);
/*余证*/
@Update
(
"update group_no \n"
+
"set group_no.SPECIAL_CARD_COUNT=group_no.SPECIAL_CARD_COUNT+1 \n"
+
"where group_no.group_no=(select group_no from PROD_CARD_T@PROD_LINK \n"
+
"left join group_no on group_no.GROUP_NO=subStr(PROD_CARD_T.ACCEPT_NO,0,8)\n"
+
"where PROD_CARD_T.accept_no =#{acceptNo}) "
)
public
boolean
specialCardAdd
(
@Param
(
"acceptNo"
)
String
acceptNo
);
@Insert
(
"insert into SPECIAL_CARD (ACCEPT_NO,TASK_ID,SPECIAL_TYPE,GROUP_NO,INITIATOR,FILL_IN_DATE,REMARK)\n"
+
"values(\n"
+
"#{acceptNo},(select TASK_ID from group_no where group_no=subStr(#{acceptNo})),1,"
+
"subStr(#{acceptNo}),#{initiator},#{date},#{remark})\n"
)
public
boolean
addSpecialCard
(
@Param
(
"acceptNo"
)
String
acceptNo
);
public
List
<
Map
<
String
,
Object
>>
selectTaskListDate
(
String
acceptNo
);
}
src/main/java/com/yxproject/start/service/FailedCardService.java
View file @
3d24c563
...
...
@@ -15,4 +15,8 @@ public interface FailedCardService {
public
boolean
insertFailedCard
(
@Param
(
"failedCardReasonId"
)
String
failedCardReasonId
,
@Param
(
"acceptNo"
)
String
acceptNo
,
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"initiator"
)
String
initiator
,
@Param
(
"note"
)
String
note
);
public
Map
<
String
,
Object
>
selectCountIdByCardId
(
String
cardId
);
public
boolean
specialCardAdd
(
@Param
(
"acceptNo"
)
String
acceptNo
);
public
boolean
addSpecialCard
(
@Param
(
"acceptNo"
)
String
acceptNo
);
}
src/main/java/com/yxproject/start/service/impl/FailedCardServiceImpl.java
View file @
3d24c563
...
...
@@ -35,4 +35,18 @@ public class FailedCardServiceImpl implements FailedCardService {
Map
<
String
,
Object
>
result
=
failedCardMapper
.
selectCountIdByCardId
(
cardId
);
return
result
;
}
@Override
public
boolean
specialCardAdd
(
String
acceptNo
)
{
failedCardMapper
.
specialCardAdd
(
acceptNo
);
return
true
;
}
@Override
public
boolean
addSpecialCard
(
String
acceptNo
)
{
failedCardMapper
.
addSpecialCard
(
acceptNo
);
return
true
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment