app 小包干bug修改
This commit is contained in:
parent
ec720453fe
commit
aa59ba3c26
|
|
@ -101,7 +101,12 @@ public class ContractNoSignAdapter extends BaseAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
holder.proName.setText("工作地点:" + bean.getWorkAdress());
|
holder.proName.setText("工作地点:" + bean.getWorkAdress());
|
||||||
holder.isXbgGroup.setText("是否为小包干班组:" + bean.getIsXbg());
|
if("1".equals(bean.getIsXbg())){
|
||||||
|
holder.isXbgGroup.setText("是否为小包干班组:是");
|
||||||
|
}else{
|
||||||
|
holder.isXbgGroup.setText("是否为小包干班组:否");
|
||||||
|
}
|
||||||
|
|
||||||
holder.partyA.setText("甲方:" + bean.getPartA());
|
holder.partyA.setText("甲方:" + bean.getPartA());
|
||||||
holder.effectiveDate.setText("生效日期:" + bean.getEffectDate());
|
holder.effectiveDate.setText("生效日期:" + bean.getEffectDate());
|
||||||
holder.signingDate.setText("签订日期:" + bean.getSigningDate());
|
holder.signingDate.setText("签订日期:" + bean.getSigningDate());
|
||||||
|
|
|
||||||
|
|
@ -901,23 +901,6 @@ public class FaceAttendanceFragment extends BaseFragment implements ViewTreeObse
|
||||||
attendanceBean.setDataType(checkMode);
|
attendanceBean.setDataType(checkMode);
|
||||||
attendanceBean.setContractId(contractId);
|
attendanceBean.setContractId(contractId);
|
||||||
|
|
||||||
// 先查本地数据库是否有该人员考勤,若有则不在打卡,若无则查询后台数据库是否有考勤数据
|
|
||||||
List<FaceAttendanceBean> lists = faceAttendanceDao.selectFaceAttendanceByIdnumber(attendanceBean.getCurrentDay(), compareResult.getIdCard());
|
|
||||||
// if (lists.size() > 0) {
|
|
||||||
// XToastUtils.warning(compareResult.getUserName() + "今日已考勤!");
|
|
||||||
// } else {
|
|
||||||
// selectFaceByIdNumber(attendanceBean.getCurrentDay(), compareResult.getIdCard());
|
|
||||||
// if (isAttendance == 1) {
|
|
||||||
// XToastUtils.warning(compareResult.getUserName() + "今日已考勤!");
|
|
||||||
// } else if (isAttendance == 2) {
|
|
||||||
// XToastUtils.warning(compareResult.getUserName() + "今日为休息状态!");
|
|
||||||
// } else {
|
|
||||||
// //TODO 考勤成功之前先判断她有没有打这种卡的权限
|
|
||||||
// faceAttendanceDao.addFaceAttendance(attendanceBean);
|
|
||||||
// XToastUtils.success(compareResult.getUserName() + "考勤成功");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (checkMode.equals("1")) {
|
if (checkMode.equals("1")) {
|
||||||
faceAttendanceDao.addFaceAttendance(attendanceBean);
|
faceAttendanceDao.addFaceAttendance(attendanceBean);
|
||||||
XToastUtils.success(compareResult.getUserName() + "考勤成功");
|
XToastUtils.success(compareResult.getUserName() + "考勤成功");
|
||||||
|
|
@ -925,15 +908,15 @@ public class FaceAttendanceFragment extends BaseFragment implements ViewTreeObse
|
||||||
String number = attendanceBean.getIdNumber();
|
String number = attendanceBean.getIdNumber();
|
||||||
List<IDCardBean> listUser = UserFeatureManager.getUserFeature(getActivity());
|
List<IDCardBean> listUser = UserFeatureManager.getUserFeature(getActivity());
|
||||||
IDCardBean idCardInfo = new IDCardBean();
|
IDCardBean idCardInfo = new IDCardBean();
|
||||||
|
assert listUser != null;
|
||||||
for (IDCardBean bean : listUser) {
|
for (IDCardBean bean : listUser) {
|
||||||
if (bean.getIdNumber().equals(number)) {
|
if (bean.getIdNumber().equals(number)) {
|
||||||
idCardInfo = bean;
|
idCardInfo = bean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("idCardInfo=" + idCardInfo);
|
System.out.println("idCardInfo=" + idCardInfo);
|
||||||
// 判断是否签订合同
|
// 判断是否签订合同
|
||||||
if (idCardInfo.getIsXbg().equals(0)) {
|
if ("0".equals(idCardInfo.getIsXbg())) {
|
||||||
XToastUtils.warning(compareResult.getUserName() + "未签订小包干协议!请打计日卡,或者重新签订合同!");
|
XToastUtils.warning(compareResult.getUserName() + "未签订小包干协议!请打计日卡,或者重新签订合同!");
|
||||||
} else {
|
} else {
|
||||||
faceAttendanceDao.addFaceAttendance(attendanceBean);
|
faceAttendanceDao.addFaceAttendance(attendanceBean);
|
||||||
|
|
|
||||||
|
|
@ -399,12 +399,7 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
|
||||||
View custom = LayoutInflater.from(getContext()).inflate(R.layout.dialog_piecework, null);
|
View custom = LayoutInflater.from(getContext()).inflate(R.layout.dialog_piecework, null);
|
||||||
final SuperButton cancel = custom.findViewById(R.id.cancel);
|
final SuperButton cancel = custom.findViewById(R.id.cancel);
|
||||||
final SuperButton ok = custom.findViewById(R.id.ok);
|
final SuperButton ok = custom.findViewById(R.id.ok);
|
||||||
final TextView content = custom.findViewById(R.id.content);
|
|
||||||
|
|
||||||
// 获取合同名称并赋值
|
|
||||||
// String name = getContractInfo();
|
|
||||||
// contract = custom.findViewById(R.id.contract);
|
|
||||||
// contract.setText(name);
|
|
||||||
builder.setView(custom);
|
builder.setView(custom);
|
||||||
final AlertDialog dialog = builder.create();
|
final AlertDialog dialog = builder.create();
|
||||||
cancel.setOnClickListener(new View.OnClickListener() {
|
cancel.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
@ -449,9 +444,6 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
|
||||||
List<MapBean> contractL = lumpSumBean.getContract();
|
List<MapBean> contractL = lumpSumBean.getContract();
|
||||||
List<ProcessBean> processL = lumpSumBean.getProcess();
|
List<ProcessBean> processL = lumpSumBean.getProcess();
|
||||||
|
|
||||||
//假设选中的就是第一个
|
|
||||||
List<ProcessBean> process = lumpSumBean.getProcess();
|
|
||||||
|
|
||||||
List<String> contractList = new ArrayList<>();
|
List<String> contractList = new ArrayList<>();
|
||||||
|
|
||||||
for (int i = 0; i < contractL.size(); i++) {
|
for (int i = 0; i < contractL.size(); i++) {
|
||||||
|
|
@ -469,8 +461,6 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
|
||||||
// 这里可以获取并打印选择的值
|
// 这里可以获取并打印选择的值
|
||||||
String selectedValue = (String) adapterView.getItemAtPosition(name);
|
String selectedValue = (String) adapterView.getItemAtPosition(name);
|
||||||
System.out.println("Selected value: " + selectedValue);
|
System.out.println("Selected value: " + selectedValue);
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < contractL.size(); i++) {
|
for (int i = 0; i < contractL.size(); i++) {
|
||||||
if (contractL.get(i).getValue1().equals(selectedValue)) {
|
if (contractL.get(i).getValue1().equals(selectedValue)) {
|
||||||
MapBean mapBean = contractL.get(i);
|
MapBean mapBean = contractL.get(i);
|
||||||
|
|
@ -480,7 +470,7 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
|
||||||
List<MapBean> list = processL.get(i).getProcessList();
|
List<MapBean> list = processL.get(i).getProcessList();
|
||||||
List<String> processList = new ArrayList<>();
|
List<String> processList = new ArrayList<>();
|
||||||
for (int z = 0; z < list.size(); z++) {
|
for (int z = 0; z < list.size(); z++) {
|
||||||
processList.add(list.get(z).getValue1());
|
processList.add("工序:"+list.get(z).getValue1() + " => 桩位:"+list.get(z).getValue2());
|
||||||
}
|
}
|
||||||
ArrayAdapter<String> adpterPos = new CustomAdpter<String>(getActivity(), android.R.layout.simple_spinner_item, processList);
|
ArrayAdapter<String> adpterPos = new CustomAdpter<String>(getActivity(), android.R.layout.simple_spinner_item, processList);
|
||||||
//绑定 Adapter到控件
|
//绑定 Adapter到控件
|
||||||
|
|
@ -489,42 +479,19 @@ public class MapFragment extends BaseFragment implements View.OnClickListener {
|
||||||
procedure.setAdapter(adpterPos);
|
procedure.setAdapter(adpterPos);
|
||||||
procedure.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
procedure.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
||||||
public void onItemSelected(AdapterView<?> adapterView, View view, int positionName, long id) {
|
public void onItemSelected(AdapterView<?> adapterView, View view, int positionName, long id) {
|
||||||
// 这里可以获取并打印选择的值
|
// 这里可以获取并打印选择的值
|
||||||
String selectedValue2 = (String) adapterView.getItemAtPosition(positionName);
|
String selectedValue2 = (String) adapterView.getItemAtPosition(positionName);
|
||||||
System.out.println("Selected value: " + selectedValue2);
|
System.out.println("Selected value: " + selectedValue2);
|
||||||
|
|
||||||
for (int h = 0; h < list.size(); h++) {
|
for (int h = 0; h < list.size(); h++) {
|
||||||
if (list.get(h).getValue1().equals(selectedValue2)) {
|
String value = "工序:"+list.get(h).getValue1() + " => 桩位:"+list.get(h).getValue2();
|
||||||
|
if (value.equals(selectedValue2)) {
|
||||||
List<String> positionList = new ArrayList<>();
|
List<String> positionList = new ArrayList<>();
|
||||||
gxName = list.get(h).getValue1();
|
gxName = value;
|
||||||
gxId = list.get(h).getKey();
|
gxId = list.get(h).getKey();
|
||||||
positionList.add(list.get(h).getValue2());
|
|
||||||
ArrayAdapter<String> adpterPos = new CustomAdpter<String>(getActivity(), android.R.layout.simple_spinner_item, positionList);
|
|
||||||
//绑定 Adapter到控件
|
|
||||||
position = custom.findViewById(R.id.position);
|
|
||||||
WidgetUtils.setSpinnerDropDownVerticalOffset(position);
|
|
||||||
position.setAdapter(adpterPos);
|
|
||||||
position.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
||||||
@Override
|
|
||||||
|
|
||||||
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
|
|
||||||
// 这里可以获取并打印选择的值
|
|
||||||
String selectedValue3 = (String) adapterView.getItemAtPosition(position);
|
|
||||||
System.out.println("Selected value: " + selectedValue3);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ public class WorkConfig {
|
||||||
*/
|
*/
|
||||||
// @Value("${environment}")
|
// @Value("${environment}")
|
||||||
// public static String environment;
|
// public static String environment;
|
||||||
public static String environment = "local";
|
public static String environment = "test";
|
||||||
|
|
||||||
|
|
||||||
protected static final String GZRAMA_URL_LOCAL = "http://192.168.0.137:1917/hnAma/";
|
protected static final String GZRAMA_URL_LOCAL = "http://192.168.0.137:1917/hnAma/";
|
||||||
|
|
|
||||||
|
|
@ -28,28 +28,29 @@
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- <TextView-->
|
<TextView
|
||||||
<!-- android:layout_width="match_parent"-->
|
android:layout_width="match_parent"
|
||||||
<!-- android:layout_height="match_parent"-->
|
android:layout_height="match_parent"
|
||||||
<!-- android:text="某某合同"-->
|
android:text="合同"
|
||||||
<!-- android:id="@+id/contract"-->
|
/>
|
||||||
<!-- />-->
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/contract"
|
android:id="@+id/contract"
|
||||||
/>
|
/>
|
||||||
<Spinner
|
|
||||||
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
|
android:text="工序桩位"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:id="@+id/procedure"
|
|
||||||
/>
|
/>
|
||||||
<Spinner
|
<Spinner
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:id="@+id/position"
|
android:id="@+id/procedure"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue